package app.sevenc.lib_framework.imageloader

import android.widget.ImageView

/**
 * 图片加载代理类
 *
 * @author Seven-C
 * @date 2021/8/30
 */
object ImageLoaderProxy {
    private val imageLoader: IImageLoader by lazy { GlideImpl() }

    fun loadImage(
        view: ImageView,
        imageUrl: String,
        scaleType: ScaleType = ScaleType.CENTER_CROP,
        isCircle:Boolean = false,
        roundingRadiusPx: Int = 0,
        topLeft: Float = 0f,
        topRight: Float = 0f,
        bottomRight: Float = 0f,
        bottomLeft: Float = 0f
    ) {
        imageLoader.loadImage(
            view,
            imageUrl,
            scaleType,
            isCircle,
            roundingRadiusPx,
            topLeft,
            topRight,
            bottomRight,
            bottomLeft
        )
    }
}